package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:23:54 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductGlossaryBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductGlossary productGlossary;

  protected BeanMap getBeanMap() {

    return new BeanMap(productGlossary);
  }

  static {
    mappedDaoFields.put("code", com.ourteam.product.requirement.dao.IProductGlossaryDAO.Code);

    mappedDaoFields.put("content", com.ourteam.product.requirement.dao.IProductGlossaryDAO.Content);

    mappedDaoFields.put(
        "createDate", com.ourteam.product.requirement.dao.IProductGlossaryDAO.CreateDate);

    mappedDaoFields.put(
        "creatorId", com.ourteam.product.requirement.dao.IProductGlossaryDAO.CreatorId);

    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductGlossaryDAO.Id);

    mappedDaoFields.put(
        "lastEditDate", com.ourteam.product.requirement.dao.IProductGlossaryDAO.LastEditDate);

    mappedDaoFields.put(
        "lastEditorId", com.ourteam.product.requirement.dao.IProductGlossaryDAO.LastEditorId);

    mappedDaoFields.put(
        "lastEditorName", com.ourteam.product.requirement.dao.IProductGlossaryDAO.LastEditorName);

    mappedDaoFields.put("name", com.ourteam.product.requirement.dao.IProductGlossaryDAO.Name);

    mappedDaoFields.put(
        "productId", com.ourteam.product.requirement.dao.IProductGlossaryDAO.ProductId);

    mappedDaoFields.put("remarks", com.ourteam.product.requirement.dao.IProductGlossaryDAO.Remarks);

    mappedDaoFields.put("status", com.ourteam.product.requirement.dao.IProductGlossaryDAO.Status);

    mappedDaoFields.put(
        "sinceVersionId", com.ourteam.product.requirement.dao.IProductGlossaryDAO.SinceVersionId);

    mappedDaoFields.put(
        "sinceVersion", com.ourteam.product.requirement.dao.IProductGlossaryDAO.SinceVersion);

    mappedDaoFields.put("type", com.ourteam.product.requirement.dao.IProductGlossaryDAO.Type);

    mappedDaoFields.put(
        "productDefineId", com.ourteam.product.requirement.dao.IProductGlossaryDAO.ProductDefineId);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductGlossaryBean() {
    super();

    this.productGlossary = new com.ourteam.product.requirement.dao.ProductGlossary();
  }

  public ProductGlossaryBean(com.ourteam.product.requirement.dao.ProductGlossary productGlossary) {
    super();

    this.productGlossary = productGlossary;
  }

  public com.ourteam.product.requirement.dao.ProductGlossary convertToProductGlossary() {
    return this.productGlossary;
  }

  public com.ourteam.product.requirement.dao.ProductGlossary convertTo() {
    return this.productGlossary;
  }

  /**
   * Get code
   *
   * @return String
   */
  public String getCode() {
    return (String) this.productGlossary.getCode();
  }

  /**
   * Set code
   *
   * @parameter String
   */
  public void setCode(String code) {

    this.productGlossary.setCode(code);
  }

  /**
   * Get content
   *
   * @return String
   */
  public String getContent() {
    return (String) this.productGlossary.getContent();
  }

  /**
   * Set content
   *
   * @parameter String
   */
  public void setContent(String content) {

    this.productGlossary.setContent(content);
  }

  /**
   * Get createDate
   *
   * @return java.util.Date
   */
  public java.util.Date getCreateDate() {
    return (java.util.Date) this.productGlossary.getCreateDate();
  }

  /**
   * Set createDate
   *
   * @parameter java.util.Date
   */
  public void setCreateDate(java.util.Date createDate) {

    this.productGlossary.setCreateDate(createDate);
  }

  /**
   * Get creatorId
   *
   * @return long
   */
  public long getCreatorId() {
    return (long) this.productGlossary.getCreatorId();
  }

  /**
   * Set creatorId
   *
   * @parameter long
   */
  public void setCreatorId(long creatorId) {

    this.productGlossary.setCreatorId(creatorId);
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productGlossary.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productGlossary.setId(id);
  }

  /**
   * Get lastEditDate
   *
   * @return java.util.Date
   */
  public java.util.Date getLastEditDate() {
    return (java.util.Date) this.productGlossary.getLastEditDate();
  }

  /**
   * Set lastEditDate
   *
   * @parameter java.util.Date
   */
  public void setLastEditDate(java.util.Date lastEditDate) {

    this.productGlossary.setLastEditDate(lastEditDate);
  }

  /**
   * Get lastEditorId
   *
   * @return long
   */
  public long getLastEditorId() {
    return (long) this.productGlossary.getLastEditorId();
  }

  /**
   * Set lastEditorId
   *
   * @parameter long
   */
  public void setLastEditorId(long lastEditorId) {

    this.productGlossary.setLastEditorId(lastEditorId);
  }

  /**
   * Get lastEditorName
   *
   * @return String
   */
  public String getLastEditorName() {

    return (String) this.productGlossary.getLastEditorName();
  }

  /**
   * Get name
   *
   * @return String
   */
  public String getName() {
    return (String) this.productGlossary.getName();
  }

  /**
   * Set name
   *
   * @parameter String
   */
  public void setName(String name) {

    this.productGlossary.setName(name);
  }

  /**
   * Get productId
   *
   * @return long
   */
  public long getProductId() {
    return (long) this.productGlossary.getProductId();
  }

  /**
   * Set productId
   *
   * @parameter long
   */
  public void setProductId(long productId) {

    this.productGlossary.setProductId(productId);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productGlossary.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productGlossary.setRemarks(remarks);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productGlossary.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productGlossary.setStatus(status);
  }

  /**
   * Get sinceVersionId
   *
   * @return long
   */
  public long getSinceVersionId() {
    return (long) this.productGlossary.getSinceVersionId();
  }

  /**
   * Set sinceVersionId
   *
   * @parameter long
   */
  public void setSinceVersionId(long sinceVersionId) {

    this.productGlossary.setSinceVersionId(sinceVersionId);
  }

  /**
   * Get sinceVersion
   *
   * @return String
   */
  public String getSinceVersion() {

    return (String) this.productGlossary.getSinceVersion();
  }

  /**
   * Get type
   *
   * @return String
   */
  public String getType() {
    return (String) this.productGlossary.getType();
  }

  /**
   * Set type
   *
   * @parameter String
   */
  public void setType(String type) {

    this.productGlossary.setType(type);
  }

  /**
   * Get productDefineId
   *
   * @return long
   */
  public long getProductDefineId() {

    return (long) this.productGlossary.getProductDefineId();
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductGlossaryBean) == false) {
      return false;
    } // end if

    ProductGlossaryBean other = (ProductGlossaryBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductGlossary tempProductGlossary =
        other.convertToProductGlossary();

    if (tempProductGlossary == null || this.productGlossary == null) {
      isEqual = false;
    } else if (tempProductGlossary == this.productGlossary
        || tempProductGlossary.equals(this.productGlossary)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductGlossaryBean[] toArray(
      com.ourteam.product.requirement.dao.ProductGlossary[] aProductGlossarys) {

    return toArray(aProductGlossarys, null);
  }

  public static ProductGlossaryBean[] toArray(
      com.ourteam.product.requirement.dao.ProductGlossary[] aProductGlossarys,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductGlossarys)) {
      return new ProductGlossaryBean[0];
    }

    int length = aProductGlossarys.length;

    ProductGlossaryBean[] beans = new ProductGlossaryBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductGlossaryBean(aProductGlossarys[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductGlossarys[i]});
      }
    }

    return beans;
  }
}
